#pragma once

namespace ZeEngine
{
    class Entity;

    typedef std::vector<Entity*> EntityContainer; 

    class EntityDataStore : private EntityContainer
    {
        friend class EntityManager;

    public:
        EntityDataStore();
        virtual ~EntityDataStore();
        EntityDataStore(const EntityDataStore& store){}

        EntityContainer::iterator end();
        EntityContainer::iterator begin();

		bool GetIntersectingEntities(const Vector2D<f32>& position, const Vector2D<f32>& dimension, std::vector<Entity*>& oEntities);
		bool HasIntersectingEntities(const Vector2D<f32>& position, const Vector2D<f32>& dimension);

    private:
        
        Entity* GetNewEntity(const std::string& name);
        void Insert(Entity* pEntity);
        void Remove(Entity* pEntity);
        
        EntityContainer m_freeEntities;

    private:

    };
}

